<?php
/*
 * Created on 04.01.2006
 *
 */

class c_caseHandler 
{
    
    function parentIn ()
    {
        return array('c:switch');
    }

    function startElement (& $sender, $attrs, $line)
    {
        if (!$attrs['val'])
        {
            die ("Attribute val is missing in c:case tag in line $line!\n");
        }
        $sender->surpressAppend(false);
        $sender->appendCode('case '.$attrs['val'].':'."\n");
    }
    
    function endElement (& $sender)
    {
        $sender->appendCode('   break;'."\n");
        $sender->surpressAppend(true);
    }

}

?>
